﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace ClassLibrary
{
    public static class ClsHtmlCodeTransform
    {
        /// <summary>
        /// 將HTML字串編碼
        /// </summary>
        public static string Encode(string str)
        {
            return HttpUtility.HtmlEncode(str);
        }

        /// <summary>
        /// 將HTML字串解碼
        /// </summary>
        public static string Decode(string str)
        {
            return HttpUtility.HtmlDecode(str);
        }
    }
}
